]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
viewSelector: Make toggle-application-view binding available in overview
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 16 Aug 2012 12:46:23 +0000 (14:46 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 17 Nov 2012 00:52:52 +0000 (01:52 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=688202

js/ui/viewSelector.js

index bf06439e4323377bb65c6a3de0cd2f14cf71acbc..4d096ba499f8e8d1bfdb0d512496d722b7dce47d 100644 (file)
@@ -144,15 +144,17 @@ const ViewSelector = new Lang.Class({
         this.constrainHeight = new Clutter.BindConstraint({ source: this._pageArea,
                                                             coordinate: Clutter.BindCoordinate.HEIGHT });
 
-        global.display.add_keybinding('toggle-application-view',
-                                      new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
-                                      Meta.KeyBindingFlags.NONE,
-                                      Lang.bind(this, this._showWithAppsPage));
+        Main.wm.addKeybinding('toggle-application-view',
+                              new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
+                              Meta.KeyBindingFlags.NONE,
+                              Main.KeybindingMode.NORMAL |
+                              Main.KeybindingMode.OVERVIEW,
+                              Lang.bind(this, this._toggleAppsPage));
     },
 
-    _showWithAppsPage: function() {
+    _toggleAppsPage: function() {
         Main.overview.show();
-        this._showAppsButton.set_checked(true);
+        this._showAppsButton.checked = !this._showAppsButton.checked;
     },
 
     show: function() {